package com.suray.attendance.model.enums.erp;

/**
 * Description: erp中生产入库的单据类型
 * Author: linyu
 * Date: 2023/11/8
 */
public enum MoReceiptDocTypeCodeEnum {

    安徽机电生产入库单("5A80"),
    安徽机电拆件入库单("5A81"),
    安徽生产生产入库单("5A40"),
    安徽生产拆件入库单("5A42"),
    安徽生产重工入库单("5A43");

    private String docTypeCode;

    MoReceiptDocTypeCodeEnum(String docTypeCode) {
        this.docTypeCode = docTypeCode;
    }

    public String getDocTypeCode() {
        return docTypeCode;
    }

    public void setDocTypeCode(String docTypeCode) {
        this.docTypeCode = docTypeCode;
    }

    public static String getDocTypeCodeByDocTypeName(String docTypeName) {
        MoReceiptDocTypeCodeEnum arrObj[] = MoReceiptDocTypeCodeEnum.values();
        for (MoReceiptDocTypeCodeEnum obj : arrObj) {
            if (obj.name().contains(docTypeName.substring(0,6))) {
                return obj.getDocTypeCode();
            }
        }
        return "";
    }


}
